<template>
  <div class="body-container">
    <div class="body-main">
      <div class="sec-top">
        <button class="btn btn-sm btn-primary" @click="addItem">新增</button>
      </div>
      <table class="table table-bordered table-hover">
        <caption>事件录入</caption>
        <thead>
          <tr>
            <th>序号</th>
            <th>事件类型</th>
            <th class="col-xs-2">事件描述</th>
            <th>最近更新事件</th>
            <th>开始时间</th>
            <!-- <th>结束时间</th> -->
            <th>目前状态</th>
            <th>操作</th>
          </tr>
        </thead>
        <tbody>
          <tr v-for="(index,it) in list">
            <td>{{index + 1}}</td>
            <td>{{it.eventTypeName}}</td>
            <td>{{it.eventDesc}}</td>
            <td>{{it.updateDt | toDate}}</td>
            <td>{{it.startDt | toDate}}</td>
            <!-- <td>{{it.endDt | toDate}}</td> -->
            <td>{{it.kpiProcStatusName}}</td>
            <td>
              <button v-if="+it.kpiProcStatus === 1" class="btn btn-sm btn-primary" @click="modify(it)">编辑</button>
              <button class="btn btn-sm btn-primary" @click="toDetail(it)">详情</button>
            </td>
          </tr>
        </tbody>
      </table>
      <vue-pages :pages.sync="pages" :get-list="getList"></vue-pages>
    </div>
    <vue-config v-ref:risk-config></vue-config>
  </div>
</template>
<style src="./entry.css" scoped></style>
<script src="./entry.js"></script>